home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / utility / ffe101.zip / ABOUT.SWG / 0001_MISC INFOS.pas next >
Pascal/Delphi Source File  |  1997-02-15  |  8KB  |  165 lines

  1.  
  2. { Updated ABOUT.SWG on September 3, 1996 }
  3.  
  4. Definition of the data types used in the file format list
  5.  
  6. In the file format list, several short mnemonics are used to describe
  7. the structure of the data stored. Here I describe the structure (and
  8. possible conversion) between some of these types. As some types have
  9. different sizes across the platforms, for most types the byte order and
  10. bit size is given to describe it.
  11.  
  12. ASCIIZ                  A sequence of characters(->char), terminated
  13.                         with the special character with the value 0.
  14.                         Note that ASCIIZ strings as most structures on
  15.                         Intel machines should not be larger than
  16.                         64Kb due to the ancient segmentation used.
  17. BCD                     Binary coded decimal
  18.                         A decimal number is converted into a hexadecimal number
  19.                         which has the same digits as the decimal number.
  20.                         (10d becomes 10h, 21d becomes 21h)
  21. Bitmap                  If a value is declared as bitmapped, that means that
  22.                         every bit in this value might have a different meaning.
  23.                         The bytes are numbered from right to left, the least
  24.                         significant bit has the number 0. After the bit number,
  25.                         there are either two statements, separated by a
  26.                         slash("/"), which are the two meanings if the bit is
  27.                         set / not set, or one single statement, which is the
  28.                         meaning of this bit, if it is set.
  29. Byte                    8 bit unsigned number. Smallest unit a record
  30.                         consists of. All offsets are in the unit bytes.
  31.                         (0-255)
  32. Char                    Synonym for byte, most values are between 32 and
  33.                         255. (#0-#255)
  34. DWord                   32 bit signed number. Well, maybe some of the
  35.                         formats use a DWord which is a 32 bit unsigned
  36.                         number, but as files tend not to be greater than
  37.                         2GB, this won't be my concern. To convert
  38.                         between Intel and Motorola format, you have to
  39.                         swap bytes #2 & #3 and bytes #1 & #4.(-2Gb-+2Gb)
  40. Int                     Integer. Signed 16-bit number.
  41.                         (-32767-+32767)
  42. LString                 A string which is preceeded by the length. Also
  43.                         named "counted" string. Used by most Pascal
  44.                         implementations Maximum length is 255 bytes, but it can
  45.                         contain any char.
  46. Nybble                  The upper or lower four bits of a byte. A nybble
  47.                         is a single hex digit and can have values from
  48.                         0 to 15. A signed nybble can have values from
  49.                         -8 to 7 with bit 3 being the sign bit.
  50. Paragraph               A multiple of 16. A paragraph was the resolution of the
  51.                         Intel chip 64K segments.
  52. Word                    16 bit unsigned number. Note that byte order is
  53.                         important, wether you have a Motorola machine or
  54.                         an Intel one. Conversion between the two formats
  55.                         is simply by swapping byte #1 with byte #2.
  56.                         (0-65535)
  57.  
  58.                     How to identify different files
  59.  
  60. While searching for different file formats, I found the following programs
  61. helpful to gather information about different files. They all are DOS programs
  62. since I'm not familiar with other platforms (except Windows). Most of them
  63. should be available on SimTel CDs or via FTP at ftp.cdrom.com, except for my
  64. program TF, which is still in beta.
  65.  
  66. LIST.COM        v9.0a by Vernon Buerg
  67.                 List is a file lister which supports both text and hex-view.
  68.  
  69. HIEW.EXE        v4.18 by Sen
  70.                 Another file lister with build-in disassembler.
  71.  
  72. FILE.EXE        v2.0 by Felix von Leitner
  73.                 File is a file identification program.
  74.  
  75. Q.COM           v3.01 by SemWare
  76.                 QEdit is the editor I'm editing the list with.
  77.  
  78. TF.EXE          v0.38 by me
  79.                 The program that started it all. A "simple" file identification
  80.                 program - no more, since it has grown too big by now.
  81.                 Still unreleased, since it is not really extensible yet.
  82.  
  83.                    The file formats list meta list ;)
  84.  
  85. The file format list uses a certain format to make it readable by programs which
  86. convert it into the WinHelp format or create program structures out of the
  87. lists. This format is very similar to the format used by Ralf Brown in his PC
  88. interrupt list but was extended by me to accomodate for the specific needs of
  89. this list :
  90.  
  91. Each topic in the list is delimited by a line of 45 chars, in which the
  92. first 8 contain the char '-'. After these, there follows one character which
  93. contains the type of topic. The different topics are described in the list
  94. itself, the char '!' denotes an information topic - like the list of chars and
  95. their meaning. After the topic identifier, there follows another '-' char and
  96. then the topic name, not containing any '-' chars. After the topic name, there
  97. may be some other descriptors like for Motorola byte ordering, guesswork marking
  98. or other purposes, see the main list for further information. The line is ended
  99. with at least one '-' char. Take the following prototype :
  100.  
  101. --------?-TEST------------------------------
  102.  
  103. OFFSET              Count TYPE   Description
  104. EXTENSION:
  105. OCCURENCES:
  106. PROGRAMS:
  107. REFERENCE:
  108. SEE ALSO:
  109. VALIDATION:
  110.  
  111. Sub-topics like different records are mostly delimited by three dashes ('-').
  112. I suggest folding them up and making them available as a popup window.
  113.  
  114. Tables have the following format :
  115. (see table 0000)
  116. for a table reference and
  117. (Table 0000)
  118. for the beginning of a table. The end of a table is undefined (yet).
  119.  
  120.  
  121.                         A primer on file formats
  122.  
  123.                               Abbrevations
  124. Throughout the list, many abbrevations are used, some in the reference
  125. section. Here some are explained :
  126.  
  127. c't
  128. The c't is a german computer magazine, which developed the Borland
  129. Pascal for OS/2 patch. They release source code in files called
  130. CTmmyy.*. Note that comments in the source code and the language in
  131. the issues tend to be german :-)
  132.  
  133. DDJxxyy
  134. (Doctor Dobb's Journal)
  135. The DDJ is a monthly publication by M&T/US which is intended for the
  136. professional programmer. The four digits after the name indicate the
  137. month/year of the issue referred to. Most of the sourcecode published
  138. in the issue is available electronically on Compu$erve and other BBSes.
  139. The files have the name DDJyymm.
  140.  
  141. PDN
  142. Programmer's Distribution Net
  143. A network dedicated to the distribution of source code useful to
  144. programmers. Often linked with Fido-nodes.
  145.  
  146. Contributions to this list were made by :
  147.    Ralf Brown (The .EXE file formats from the INTERRUPT List, general layout)
  148.    David Dilworth (david.dilworth@sierraclub.org)
  149.    Daniel Dissett (ddissett@netcom.com)
  150.    Marcus Groeber (marcusg@ph-cip.uni-koeln.de)
  151.    Darrel Hankerson (hankedr@mail.auburn.edu)
  152.    Carl Hauser (chauser.parc@xerox.com)
  153.    Jouni Miettunen (jon@stekt.oulu.fi)
  154.    Jan Nicolai Langfeldt (janl@ifi.uio.no)
  155.    Mark Ouellet (Telix .FON structures)
  156.    Greg Roelofs (roe2@midway.uchicago.edu)
  157.    Robert Rothenburg Walking-Owl (wlkngowl@unix.asb.com)
  158.    Jesus Villena (CONVERT.EXE, a digital sample conversion program)
  159.    Christos Zoulas (christos@deshaw.com)
  160.    JAL / Nostalgia
  161.    David McDuffee, (75530,2626@compuserve.com)
  162.  
  163. Information gleaned from other programs :
  164.    Formats for Word and WordPerfect (Selke's filetype)
  165.